import { Avatar } from 'antd';
import UserStatus from '@/pages/UserManage/widget/UserStatus/index.jsx';

export const columns = [
  {
    title: '用户ID',
    dataIndex: 'userId',
    key: 'userId'
  },
  {
    title: '用户名',
    dataIndex: 'username',
    key: 'username'
  },
  {
    title: '头像',
    dataIndex: 'avatar',
    key: 'avatar',
    render: (value) => {
      return <Avatar src={value} size={32} />;
    }
  },
  {
    title: '昵称',
    dataIndex: 'nickname',
    key: 'nickname'
  },
  {
    title: '权限列表',
    dataIndex: 'roleList',
    key: 'roleList'
  },
  {
    title: '状态',
    dataIndex: 'status',
    key: 'status',
    render: (value) => {
      return <UserStatus status={value} />;
    }
  },
  {
    title: '封禁时间',
    dataIndex: 'suspendTime',
    key: 'suspendTime'
  },
  {
    title: '创建时间',
    dataIndex: 'createTime',
    key: 'createTime'
  },
  {
    title: '更新时间',
    dataIndex: 'updateTime',
    key: 'updateTime'
  }
];
